<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增衡器要素配置列表')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-waElementConfig-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">衡器类型：</label>
                <div class="col-sm-8">
                    <select name="waType" class="form-control m-b" th:with="type=${@commdict.getDictList('womp_weighing_apparatus_type,code,name')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">显示类型：</label>
                <div class="col-sm-8">
                    <select name="showType" class="form-control m-b" th:with="type=${@dict.getType('show_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">要素编码：</label>
                <div class="col-sm-8">
                    <select name="elementCode" class="form-control m-b" th:with="type=${@commdict.getDictList('womp_element,code,name')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">传感器序号：</label>
                <div class="col-sm-8">
                    <input name="orderNum" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">文本框宽度：</label>
                <div class="col-sm-8">
                    <input name="showWidth" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">点x坐标：</label>
                <div class="col-sm-8">
                    <input name="pointLabelLon" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">点y坐标：</label>
                <div class="col-sm-8">
                    <input name="pointLabelLat" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">框颜色：</label>
                <div class="col-sm-8">
                    <input name="labelColor" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线x坐标：</label>
                <div class="col-sm-8">
                    <input name="lineWaLon" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线y坐标：</label>
                <div class="col-sm-8">
                    <input name="lineWaLat" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">线方向：</label>
                <div class="col-sm-8">
                    <input name="lineSide" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">显示序号：</label>
                <div class="col-sm-8">
                    <input name="sortNo" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">显示标题：</label>
                <div class="col-sm-8">
                    <input name="title" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "womp/waElementConfig"
        $("#form-waElementConfig-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-waElementConfig-add').serialize());
            }
        }
    </script>
</body>
</html>